﻿@model FrogFoot.Abstract.IEstateDiscountViewModel

@{
    ViewBag.Title = "Estate discount";
}

<h2>@Model.Estate.Name ISP Discounts</h2>

<div class="form-group">
    <table class="table table-striped table-responsive">
        <thead>
            <tr>
                <td><label>Name</label></td>
                <td>Discount</td>
            </tr>
        </thead>
        <tbody>
            @if (Model.Estate.ISPEstateDiscounts != null)
            {
                foreach (var disc in Model.Estate.ISPEstateDiscounts)
                {
                    @Html.Partial("_DiscountRow", disc)
                }
            }

            @foreach (var isp in Model.ISPs)
            {
                <tr class="discountRow">
                    <td>@Html.TextBoxFor(x => isp.Name, new { @class = "form-control" })</td>
                    <td>
                        @Html.EnumDropDownListFor(d => d.Discount, new { @class = "form-control discount" })
                    </td>
                </tr>
            }
        </tbody>
    </table>
</div>


